<template>
  <div class="natural-data">
    {{time}}
  </div>
</template>

<script>
import mixin from "@/mixin/date-mixin";
export default {
  name: "natural-data",
  mixins: [mixin],
  data() {
    return {
      time: ""
    };
  },

  created() {
    this.getCurrentTime();
  },

  methods: {
    getCurrentTime() {
      let tthis = this;
      setTimeout(function() {
        var myDate = new Date(); //获取系统当前时间
        tthis.time = tthis.UTC(myDate, "timeC");
        tthis.getCurrentTime();
      }, 1000);
    }
  }
};
</script>

<style lang="less">
.natural-data {
  width: 200px;
  height: 100px;
  font-size: 14px;
}
</style>
